package com.hongyu.smart.village.ui.base;

import android.os.Bundle;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar;

import com.hongyu.smart.village.R;

import butterknife.BindView;

public abstract class BaseToolbarActivity extends BaseActivity{
    @BindView(R.id.tv_bar_title)
    public TextView tvBarTitle;
    @BindView(R.id.tool_bar)
    public Toolbar toolBar;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        toolBar.setTitle("");
        setSupportActionBar(toolBar);
        toolBar.setNavigationOnClickListener(v -> finish());
        tvBarTitle.setText(getToolBarTitle());
    }

    public abstract String getToolBarTitle();
}
